{include file=$header_start}
{strip}
<link rel="stylesheet" type="text/css" href="{$siteroot}/templates/default/style/dashboard.css">
<script type="text/javascript" src="{$siteroot}/includes/js/interest.js"></script> 
<script type="text/javascript" src="{$siteroot}/greybox/greybox.js"></script>
<link href="{$siteroot}/greybox/greybox.css" rel="stylesheet" type="text/css" media="all" />
<link rel="stylesheet" type="text/css" href="{$siteroot}/templates/default/style/find_job_list.css">
{/strip}
{literal} 
<script type="text/javascript" language="javascript">
function searchOrder()
{
	
	var Jobtype = $('#jobtype').val();
	var Budget = $('#budget').val();
		var Project_status = $('#project_status').val();
		if(Jobtype!='' || Budget!='' || Project_status!=''){
			window.location = SITEROOT+'/leads/myleads/?Jobtype='+Jobtype+'&Budget='+Budget+'&Project_status='+Project_status;
		}
		
	//}
}
</script> 
{/literal} 
<!--Gray box--> 
{literal} 
<script type="text/javascript">
	var GB_ANIMATION = true;
    jQuery(document).ready(function(){
    	jQuery("a.greybox").click(function(){
        var t = this.title || jQuery(this).text() || this.href;
        GB_show("",this.href,500,500);
         return false;
       });
     });
	 
	 // For Declined message
	var GB_ANIMATION = true;
    jQuery(document).ready(function(){
    	jQuery("a.my_review").click(function(){
        var t = this.title || jQuery(this).text() || this.href;
 			GB_show("",this.href,450,700);
  			return false;
       });
     });
	 
	 // For Message
	var GB_ANIMATION = true;
    jQuery(document).ready(function(){
    	jQuery("a.message").click(function(){
        var t = this.title || jQuery(this).text() || this.href;
 			GB_show("",this.href,600,500);
  			return false;
       });
     });
</script> 
{/literal}

{include file=$header_end}
<section class="middle_portion">
  <section class="inner_head">Dashboard</section>
  <section class="inner_containstart"> 
    <!-- dashboard Left Content Start --> 
    {include file=$cms_left_content} 
    <!-- dashboard Left Content End --> 
    <!-- dashboard Right Content Start -->
    <section class="dash_right">
      <section class="title_box">
        <h4>My Leads</h4>
        <section class="clear"></section>
      </section>
      {if $msg}<span style="padding:10px;"> {$msg} </span>{/if}
      <section class="mainbox_findjobs">
        <section class="myleads_manag_box">
          <form name="searchfrm" id="searchfrm" action="{$siteroot}/leads/myleads/" method="POST" >
            <section class="group_search_box">
              <select class="select" name="jobtype" id="jobtype" style="width:200px;">
                <option value="0">Select Job Type</option>
                
                        {section name=i loop=$getallTradeJobType}
                        
                <option value="{$getallTradeJobType[i].id}" {if $smarty.get.id2 eq $getallTradeJobType[i].id || $smarty.post.jobtype eq $getallTradeJobType[i].id} selected="selected" {/if}>
                {$getallTradeJobType[i].trade_category}
                </option>
                				                        
                        {/section}
	                 
              </select>
              &nbsp;&nbsp;
              <select class="select" name="budget" id="budget" style="width:180px;">
                <option value="0">Select Approximate Budget</option>
                
                        {section name=i loop=$getallBudget}
                        
                <option value="{$getallBudget[i].budget_id}" {if $smarty.get.id3 eq $getallBudget[i].budget_id || $smarty.post.budget eq $getallBudget[i].budget_id} selected="selected" {/if}>
                Under ${$getallBudget[i].budget_name}
                </option>
                                     
                        {/section}
                     
              </select>
              &nbsp;&nbsp;
              <select class="select" name="project_status" id="project_status" style="width:112px;">
                <option value="0">Select Stauts</option>
                <option value="Open" {if $smarty.get.id4 eq 'Open' || $smarty.post.project_status eq 'Open'} selected="selected" {/if}>
                Open
                </option>
                <option value="Accept" {if $smarty.get.id4 eq 'Accept' || $smarty.post.project_status eq 'Accept'} selected="selected" {/if}>
                Accept
                </option>
                <option value="Decline" {if $smarty.get.id4 eq 'Decline' || $smarty.post.project_status eq 'Decline'} selected="selected" {/if}>
                Decline
                </option>
                <option value="Closed" {if $smarty.get.id4 eq 'Closed' || $smarty.post.project_status eq 'Closed'} selected="selected" {/if}>
                Closed
                </option>
              </select>
              &nbsp;&nbsp;
              <input type="submit" class="btn" value="Go">
              &nbsp;&nbsp;
              <input type="button" class="btn btnwdth70" value="Clear" onclick="javascript:window.location='{$siteroot}/leads/myleads/';">
              <section class="clear"></section>
            </section>
          </form>
          <dl>
            <dt class="col1">Job ID</dt>
            <dt class="col2">Job Type</dt>
            <dt class="col3">Postal Code</dt>
            <dt class="col4">Job Description</dt>
            <dt class="col5" style="text-align:justify">Budget</dt>
            <dt class="col6">Status</dt>
            <dt class="col7">Action</dt>
            <section class="clear"></section>
          </dl>
          {section name=i loop=$leadsArray}
          <dl>
            <dd class="col1">#PR{$leadsArray[i].postjob_id}</dd>
            <dd class="col2"> {$leadsArray[i].jobtypename} </dd>
            <dd class="col3"><span style="padding-left:20px;"> {$leadsArray[i].area} </span></dd>
            <dd class="col4"> {$leadsArray[i].job_desc|truncate:50:"..."} </dd>
            <dd class="col5" style="text-align:justify">${$leadsArray[i].budgetname}</dd>
            <dd class="col6">{$leadsArray[i].new_status}</dd>
            <!--  <img src="{$siteroot}/templates/default/images/icon_reportabuse.gif" width="20" height="22" alt="Report Abuse" title="Report Abuse"/> <img src="{$siteroot}/templates/default/images/icon-search.png" width="20" height="22" alt="View Detail" title="View Detail"/> <img src="{$siteroot}/templates/default/images/delete_icon.png" width="20" height="22" alt="Delete" title="Delete"/> <img src="{$siteroot}/templates/default/images/icon-warnning.png" width="20" height="22" alt="Cant delete" title="Cant delete"/>-->
            <dd class="col7 anchorlink"><a href="{$siteroot}/leads/{$leadsArray[i].id|base64_encode}/viewlead/" style="font-size:10px;" >View<br />
              Detail</a> &nbsp;
            <a href="{$siteroot}/leads/{$leadsArray[i].postjob_id|base64_encode}/message/" title="Messages"  class="message" ><img alt="messages" src="{$siteroot}/templates/default/images/msg.png" /></a>
              
              {if $leadsArray[i].project_status eq 'Open'} <a href="{$siteroot}/leads/delete/{$leadsArray[i].id|base64_encode}/myleads/" onclick="javascript:return confirm('Are you sure do you want to delete this record?');" style="font-size:10px;" >Delete</a> {else} <a href="javascript:;" style="font-size:10px;" > Can't<br />
              Delete </a> {/if}&nbsp;<a href="{$siteroot}/leads/{$leadsArray[i].postjob_id|base64_encode}/reportabuse/" class="greybox" style="font-size:10px;" >Report <br />
              Abuse</a></dd>
            <section class="clear"></section>
          </dl>
          {sectionelse}
          <div class="error" style="padding:10px;text-align:center;">Oops, Sorry there are no leads.</div>
          {/section}
          {if $pagenation}
          <section class="pagna"> {$pagenation} </section>
          {/if}
          <section class="clear"></section>
        </section>
        <section class="clear"></section>
        <section class="bgimg_shadow"></section>
        <section class="clear"></section>
      </section>
    </section>
    <!-- dashboard Right Content End -->
    <section class="clear"></section>
  </section>
</section>
{include file=$footer} 